import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login";
import Home from "@/components/Home";
import CardAdd from "@/components/CardAdd";
import CardList from "@/components/CardList";
import CardLike from "@/components/CardLike";

Vue.use(Router)

export default new Router({
  routes: [
    //名片列表
    {
      path: '/cardLike',
      name: 'CardLike',
      component: CardLike
    },
    //名片列表
    {
      path: '/cardList',
      name: 'CardList',
      component: CardList
    },
    //名片添加
    {
      path: '/cardAdd',
      name: 'CardAdd',
      component: CardAdd
    },
    //登陆成功跳转home页面
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    //登陆页面
    {
      path: '/',
      name: 'Login',
      component: Login
    }
  ],
  mode:"history"
})
